package utilPartTwo;

import java.util.Timer;

public class TTest {
    public static void main(String[] args) {
        MyTimerTask myTimerTask=new MyTimerTask();
        Timer timer=new Timer();

        timer.schedule(myTimerTask,1000,500);

        try {
            Thread.sleep(5000);
        }catch (InterruptedException e){
            e.printStackTrace();
        }

        myTimerTask.cancel();
    }
}
